package com.easy.controller;

import com.easy.bean.Course;
import com.easy.service.CourseService;
import com.easy.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("course")
@CrossOrigin
public class CourseController {
    @Autowired
    CourseService courseService;
    @GetMapping("/all")
    public Result all(Course course){
        return Result.success(courseService.all(course));
    }
}
